/**
 * <p>Title: Test.java>
 * <p>Description: 
 * <p>Company: YSS
 * @author yangsongsong
 * @date 2019年1月1日
 */
package com.yss.factory;

public class Test {
	public static void main(String[] args) {
		RedCarFactory redCarFactory = new RedCarFactory();
		WhiteCarFactory whiteCarFactory = new WhiteCarFactory();
		GreenFactory greenFactory = new GreenFactory();

		redCarFactory.makeCar().makeCar();
		whiteCarFactory.makeCar().makeCar();
		greenFactory.makeCar().makeCar();

		AbstractFactory shapeFactory = FactoryProducer.getFactory("shape");
		shapeFactory.getShape("CIRCLE").draw();
		shapeFactory.getShape("RECTANGLE").draw();

		AbstractFactory colorFactory = FactoryProducer.getFactory("color");
		colorFactory.getColor("RED").fill();
		colorFactory.getColor("WHITE").fill();
		colorFactory.getColor("GREEN").fill();
	}
}
